const request = require("request");
module.exports = function (fn) {
  request(
    {
      url: "http://localhost:1020/shoplist",
      method: "GET",
      headers: {
        "content-type": "application/json"
      }
    },
    function (err, response, body) {
      let temp = JSON.parse(body);
      fn(temp);
    }
  );
};
